using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using SimplePoker.Main;

public static class DictionaryExtenstions
{
    public static string ToDNAString(this Dictionary<int, PlayerAction> source)
    {
        var sb = new StringBuilder();

        foreach (int rank in source.Keys)
        {
            sb.Append(rank.ToString());
            switch (source[rank])
            {
                case PlayerAction.BET: sb.Append("B,"); break;
                case PlayerAction.CALL: sb.Append("C,"); break;
                case PlayerAction.FOLD: sb.Append("F,"); break;
                default: throw new Exception("Arg wtf");
            }
        }
        sb.Length--;
        return sb.ToString();
    }

}
